package com.gu.mobileweb.controller;

import com.gu.mobileweb.model.IndexTraffic;
import com.gu.mobileweb.service.IndexTrafficService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/traffic")
public class IndexTrafficController {
    @Autowired
    private IndexTrafficService indexTrafficService;

    @GetMapping("/imgUrlList")
    public List<IndexTraffic> list(){
        return indexTrafficService.getTrafficList();
    }
}
